.fixed-to-top {
  position: fixed;
  z-index: 1020;
  transition: ease-in 250ms ease 0ms;
  background-color: #000;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  bottom: 3.125rem;
  right: 5rem;
  text-align: center;
  padding: 1rem;
  cursor: pointer;
  box-shadow: 2px 2px 5px #333;

  i.fas {
    font-size: 2rem;
    color: #fff;
  }

  .progress-number {
    color: #fff;
    width: 100%;
    font-size: 8px;
  }
}

// 小于 768px
@media (max-width: 767.98px) {
  .fixed-to-top {
    width: 3.5rem;
    height: 3.5rem;
    bottom: 3rem;
    right: 4rem;
    padding: 0.75rem;
  }
}

// 小于 576px
@media (max-width: 575.98px) {
  .fixed-to-top {
    width: 3rem;
    height: 3rem;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem;

    i.fas {
      font-size: 1.5rem;
    }
  }
}

@mixin dark-mode {
  .fixed-to-top {
    background-color: #000;
    box-shadow: 2px 2px 5px #000;

    i.fas {
      color: $dark-main-color;
    }

    .progress-number {
      color: $dark-main-color;
    }
  }
}

@media (prefers-color-scheme: dark) {
  @include dark-mode;
}

[data-theme="dark"] {
  @include dark-mode;
}
